#FROM findepi/graalvm:java17-native
FROM openjdk:17.0.2-oraclelinux8

MAINTAINER Lion Li

RUN mkdir -p /ruoyi/system/logs \
    /ruoyi/system/temp \
    /ruoyi/skywalking/agent

WORKDIR /ruoyi/system

ENV SERVER_PORT=9201 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""

EXPOSE ${SERVER_PORT}

ADD ./target/ruoyi-system.jar ./

ENTRYPOINT java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9211 \
           -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \
           #-Dskywalking.agent.service_name=ruoyi-system \
           #-javaagent:/ruoyi/skywalking/agent/skywalking-agent.jar \
           -jar ruoyi-system.jar \
           -XX:+HeapDumpOnOutOfMemoryError -Xms:256m -Xmx:256m  -Xlog:gc*,:time,tags,level -XX:+UseZGC ${JAVA_OPTS}

